var words1=["我","喜","欢","你"];
var words2=["家","旁","边","的","韭","菜","饼","和","小","龙","虾"];
var m=0;
var n=0;
var auto1;
var text="";
function autoInput() {
    auto1=setInterval(function () {
        if(m<words1.length){
            text=text+words1[m];
            $("#word1").trigger("focus").val(text);
            m++;
        }else{
            text="";
        }
    },500);
}
function autoInput2(){
    clearInterval(auto1);
    setInterval(function () {
        if(n<words2.length){
            text=text+words2[n];
            $("#word2").trigger("focus").val(text);
            n++;
        }
    },200)
}
function autoAction() {
    autoInput();
    setTimeout("autoInput2()",3500);
}
$(function () {
    autoAction();
})